/*
 * Copyright 2008 Neil Bacon
 * Distributed under the terms of the Mozilla Public License version 1.1
 * or the GNU General Public License version 3.
 */

package nb.xadd.operator;

import nb.xadd.node.Node;
import nb.xadd.node.impl.BooleanDecisionNode;
import nb.xadd.node.impl.ConstantValueNode;
import nb.xadd.node.impl.LinearValueNode;
import nb.xadd.node.impl.PolynomialValueNode;
import nb.xadd.node.impl.RealEqualDecisionNode;
import nb.xadd.node.impl.RealGreaterOrEqualDecisionNode;

public interface BinaryOperator {

    /** both arguments are terminal value nodes */
    Node executeConstantConstant(ConstantValueNode n1, ConstantValueNode n2);	
    Node executeConstantLinear(ConstantValueNode n1, LinearValueNode n2);	
    Node executeConstantPolynomial(ConstantValueNode n1, PolynomialValueNode n2);
    Node executeLinearLinear(LinearValueNode n1, LinearValueNode n2);	
    Node executeLinearPolynomial(LinearValueNode n1, PolynomialValueNode n2);
    Node executePolynomialPolynomial(PolynomialValueNode n1, PolynomialValueNode n2);

    /** arguments are terminal value node and non-terminal decision node */
    Node executeConstantBooleanDecision(ConstantValueNode n1, BooleanDecisionNode n2);
    Node executeConstantRealEqualDecision(ConstantValueNode n1, RealEqualDecisionNode n2);
    Node executeConstantRealGreaterOrEqualDecision(ConstantValueNode n1, RealGreaterOrEqualDecisionNode n2);

    Node executeLinearBooleanDecision(LinearValueNode n1, BooleanDecisionNode n2);
    Node executeLinearRealEqualDecision(LinearValueNode n1, RealEqualDecisionNode n2);
    Node executeLinearRealGreaterOrEqualDecision(LinearValueNode n1, RealGreaterOrEqualDecisionNode n2);

    Node executePolynomialBooleanDecision(PolynomialValueNode n1, BooleanDecisionNode n2);
    Node executePolynomialRealEqualDecision(PolynomialValueNode n1, RealEqualDecisionNode n2);
    Node executePolynomialRealGreaterOrEqualDecision(PolynomialValueNode n1, RealGreaterOrEqualDecisionNode n2);

    /** both arguments are non-terminal decision nodes */
    Node executeBooleanDecisionBooleanDecision(BooleanDecisionNode n1, BooleanDecisionNode n2);
    Node executeBooleanDecisionRealEqualDecision(BooleanDecisionNode n1, RealEqualDecisionNode n2);
    Node executeBooleanDecisionRealGreaterOrEqualDecision(BooleanDecisionNode n1, RealGreaterOrEqualDecisionNode n2);

    Node executeRealEqualDecisionRealEqualDecision(RealEqualDecisionNode n1, RealEqualDecisionNode n2);
    Node executeRealEqualDecisionRealGreaterOrEqualDecision(RealEqualDecisionNode n1, RealGreaterOrEqualDecisionNode n2);

    Node executeRealGreaterOrEqualDecisionRealGreaterOrEqualDecision(RealGreaterOrEqualDecisionNode n1, RealGreaterOrEqualDecisionNode n2);
}
